package com.example.booksystem.controller;

import com.example.booksystem.model.User;
import com.example.booksystem.service.impl.UserImpl;

import java.sql.SQLException;
import java.util.List;

public class UserController {
    public User login(User user){
        return new UserImpl().login(user);
    }

    public Integer sign(User user) throws SQLException {
        return new UserImpl().sign(user);
    }
    public List<User> selectUser() throws SQLException {
        return new UserImpl().users();
    }
    public Boolean toAdmin(Integer id) throws SQLException {
        return new UserImpl().toAdmin(id);
    }
    public Boolean toNomal(Integer id) throws SQLException {
        return new UserImpl().toNomal(id);
    }
    public Boolean deteleUser(Integer id)throws SQLException{
        return new UserImpl().detele(id);
    }

}
